package com.xianniu.ltc.enums;

import lombok.Getter;

/**
 * @Author wzd
 * @Version 1.0
 * @Description :<项目报表统计枚举>
 * @Date 2021/12/10 17:48
 **/
@Getter
public enum ProjectReportTypeEnum {

    //报表类型：1项目回款 2交付成本 3回款金额 4支出金额 5支出费用明细 6服务单统计 7提货单 8交付工单
    PAYMENT(1,"项目回款"),
    DELIVERY(2,"交付成本"),
    HUIKUAN(3,"回款金额"),
    ZHICHU(4,"支出金额"),
    EXPENDITUREDETAILS(5,"支出费用明细"),
    SERVICESTATISTICS(6,"服务单统计"),
    BILLOFLADING(7,"提货单"),
    DELIVERYWORKORDER(8,"交付工单");



    private Integer code;
    private String  msg;

    ProjectReportTypeEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
    /**
     * 根据code查询实例
     * @param code
     * @return
     */
    public static ProjectReportTypeEnum getByCode(String code){
        ProjectReportTypeEnum[] values = ProjectReportTypeEnum.values();
        for(ProjectReportTypeEnum value : values){
            if(value.code.equals(code)){
                return value;
            }
        }
        return null;
    }
}
